/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package replica.transaction.stateMachine;

import replica.transaction.Operation;
import replica.transaction.ReplicaEntityInterface.Expected;
import replica.transaction.TransactionStatus;

/**
 *
 * @author andrea
 */
public interface StateMachine 
{
    public void initializeStatus();
    public TransactionStatus getStatus();
    public void moveToStatus(TransactionStatus.Type newStatusType,Operation operation);
    
    /**
     * 
     * @param status
     * @return Expected.YES if i was waiting for the status serialNumber and the status type
     * Expected.SERIAL_NUM_UNEXPECTED or STATUS_TYPE_UNEXPECTED otherwise.
     */
    public Expected amIWaitingFor(TransactionStatus status);
    
    
    
}
